<script>
$(function(){
    $('#post').submit(function(){
		$.post(location.href,$(this).serialize(),function(data){
			alert(data.message);
			if (data.state <= 0)
			{
				return false;
			}
			window.location.href = '?app=<?=APP?>&mod=<?=MOD?>&act=list';
		},'json');
        return false;
    });
});
</script>
<form id="post">
<div class="t_2">
     <div class="fl">添加用户组</div>
     <div class="fr add_form"><a href="javascript:;" id="add_table"></a></div>
</div>
<div class="order_show" id="info_form">
     <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
		<tr>
			<td class="td1">用户组名称：</td>
			<td><input name="name" value="<?=$this->group['name']?>"/></td>
		</tr>
     </table>
</div>
<div class="t_2">
     <div class="fl">选择权限</div>
     <div class="fr add_form"><a href="javascript:;" id="add_table"></a></div>
</div>
<div class="order_show" id="info_form">
     <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
		<?php foreach((array)$this->nodes as $menu_name=>$node): ?>
		<tr>
			<td class="td1"><?=$menu_name?>：</td>
			<td>
				<?php foreach((array)$node as $n): ?>
			    <input<?=isset($this->gnr[$n['node_id']])?' checked':''?> type="checkbox" name="nodes[]" value="<?=$n['node_id']?>" /><?=$n['name']?>&nbsp;
				<?php endforeach; ?>
			</td>
		</tr>
		<?php endforeach; ?>
     </table>
</div>
<div class="order_show" id="info_form">
     <table width="100%" cellpadding="0" cellspacing="0" border="0" class="info_table">
		<tr><td style="text-align:center"><input type="submit" value="提交"/></td></tr>
     </table>
</div>
</form>